package com.lagou.cl.redislagouindex.pojo;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * @author 程  林
 * @date 2020-09-20 14:59
 * @description //
 * @since V1.0.0
 */
@Entity
public class Position {
	private long id;
	private String name;
	private Integer workExperience;
	private Integer education;
	private String label;
	private Integer minMoney;
	private Integer maxMoney;

	@Id
	@Column(name = "id", nullable = false)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Basic
	@Column(name = "name", nullable = true, length = 200)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Basic
	@Column(name = "work_experience", nullable = true)
	public Integer getWorkExperience() {
		return workExperience;
	}

	public void setWorkExperience(Integer workExperience) {
		this.workExperience = workExperience;
	}

	@Basic
	@Column(name = "education", nullable = true)
	public Integer getEducation() {
		return education;
	}

	public void setEducation(Integer education) {
		this.education = education;
	}

	@Basic
	@Column(name = "label", nullable = true, length = 255)
	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@Basic
	@Column(name = "min_money", nullable = true)
	public Integer getMinMoney() {
		return minMoney;
	}

	public void setMinMoney(Integer minMoney) {
		this.minMoney = minMoney;
	}

	@Basic
	@Column(name = "max_money", nullable = true)
	public Integer getMaxMoney() {
		return maxMoney;
	}

	public void setMaxMoney(Integer maxMoney) {
		this.maxMoney = maxMoney;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		Position position = (Position) o;
		return id == position.id &&
				Objects.equals(name, position.name) &&
				Objects.equals(workExperience, position.workExperience) &&
				Objects.equals(education, position.education) &&
				Objects.equals(label, position.label) &&
				Objects.equals(minMoney, position.minMoney) &&
				Objects.equals(maxMoney, position.maxMoney);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, name, workExperience, education, label, minMoney, maxMoney);
	}
}
